﻿using System.Collections;
using System.Windows.Forms.Design;

namespace CXW.Core.Sharp.Gui
{
    /// <summary>窗体隐藏[属性/事件],必须使用 [Designer(typeof(Gui.BaseFormDesigner), typeof(IRootDesigner))] ,否则无效</summary>
    internal class BaseFormDesigner : DocumentDesigner
    {
        protected override void PreFilterProperties(IDictionary properties)
        {
            base.PreFilterProperties(properties);

            #region 隐藏的属性[子类不显示的属性]
            #region Appearance
            properties.Remove("ActiveGlowColor");
            properties.Remove("FormBorderEffect");
            properties.Remove("HtmlImages");
            properties.Remove("HtmlText");
            properties.Remove("InactiveGlowColor");
            #endregion
            #region 布局
            properties.Remove("AutoSize");
            properties.Remove("AutoSizeMode");
            #endregion
            #region 窗口样式
            properties.Remove("MainMenuStrip");
            properties.Remove("SizeGripStyle");
            #endregion
            #region 行为
            properties.Remove("AllowDrop");
            properties.Remove("AutoValidate");
            properties.Remove("ContextMenuStrip");
            properties.Remove("ImeMode");
            #endregion
            #region 焦点
            properties.Remove("CausesValidation");
            #endregion
            #region 可访问性
            properties.Remove("AccessibleRole");
            #endregion
            #region 外观
            properties.Remove("Appearance");
            properties.Remove("Cursor");
            properties.Remove("LookAndFeel");
            properties.Remove("RightToLeft");
            properties.Remove("RightToLeftLayout");
            properties.Remove("UseWaitCursor");
            #endregion
            #endregion 
        }
        protected override void PreFilterEvents(IDictionary events)
        {
            base.PreFilterEvents(events);

            #region 隐藏的事件[子类不显示的事件]
            #region 布局
            events.Remove("Layout");
            events.Remove("MdiChildActivate");
            events.Remove("Move");
            events.Remove("PaddingChanged");
            events.Remove("Resize");
            #endregion
            #region 操作
            events.Remove("Click");
            events.Remove("DoubleClick");
            events.Remove("MouseCaptureChanged");
            events.Remove("MouseClick");
            events.Remove("MouseDoubleClick");
            events.Remove("ResizeBegin");
            events.Remove("ResizeEnd");
            events.Remove("Scroll");
            #endregion
            #region 行为
            events.Remove("ChangeUICues");
            events.Remove("ControlAdded");
            events.Remove("ControlRemoved");
            events.Remove("FormClosed");
            events.Remove("FormClosing");
            events.Remove("HelpButtonClicked");
            events.Remove("HelpRequested");
            events.Remove("ImeModeChanged");
            events.Remove("InputLanguageChanged");
            events.Remove("InputLanguageChanging");
            events.Remove("QueryAccessibilityHelp");
            events.Remove("Shown");
            events.Remove("StyleChanged");
            events.Remove("SystemColorsChanged");
            #endregion
            #region 键

            #endregion
            #region 焦点
            events.Remove("Activated");
            events.Remove("Deactivate");
            events.Remove("Enter");
            events.Remove("Leave");
            events.Remove("Validated");
            events.Remove("Validating");
            #endregion
            #region 属性已更改
            events.Remove("AutoSizeChanged");
            events.Remove("AutoValidateChanged");
            events.Remove("BackColorChanged");
            events.Remove("BackgroundImageChanged");
            events.Remove("BackgroundImageLayoutChanged");
            events.Remove("BindingContextChanged");
            events.Remove("CausesValidationChanged");
            events.Remove("ClientSizeChanged");
            events.Remove("ContextMenuStripChanged");
            events.Remove("CursorChanged");
            events.Remove("DockChanged");
            events.Remove("EnabledChanged");
            events.Remove("FontChanged");
            events.Remove("ForeColorChanged");
            events.Remove("LocationChanged");
            events.Remove("MaximizedBoundsChanged");
            events.Remove("MaximumSizeChanged");
            events.Remove("MinimumSizeChanged");
            events.Remove("ParentChanged");
            events.Remove("RegionChanged");
            events.Remove("RightToLeftChanged");
            events.Remove("RightToLeftLayoutChanged");
            events.Remove("SizeChanged");
            events.Remove("TextChanged");
            events.Remove("VisibleChanged");
            #endregion
            #region 鼠标

            #endregion
            #region 数据

            #endregion
            #region 拖放
            events.Remove("DragDrop");
            events.Remove("DragEnter");
            events.Remove("DragLeave");
            events.Remove("DragOver");
            events.Remove("GiveFeedback");
            events.Remove("QueryContinueDrag");
            #endregion
            #region 外观

            #endregion
            #endregion
        }
    }
}
